
import request from '@/utils/request'

export default {

  //1 首页图片
  getIndexVideo() {
    return request({
      url: '/itservice/videofront/getIndexVideo',
      method: 'get'
    })
  },
  //2 分页查看
  getPageVideo(page, limit) {
    return request({
      url: `/itservice/videofront/pageVideo/${page}/${limit}`,
      method: 'get'
    })
  },
  // 3 根据id查询视频信息
  getVideoInfoById(videoId) {
    return request({
      url: `/itservice/videoadmin/getVideoById/${videoId}`,
      method: 'get'
    })
  },

  // 4 根据id获取视频浏览数或者自增视频播放量（flag等于0获取，等于1自增）
  getPlayCountOrAddPlayCountById(videoId, flag) {
    return request({
      url: `/itservice/videofront/getPlayCountOrAddPlayCountById/${videoId}/${flag}`,
      method: 'get'
    })
  },

  // 5 写入视频查看记录
  addRecord() {
    return request({
      url: '/itservice/videorecord/addRecord',
      method: 'get'
    })
  }
}
